// 路由模块
import router from "../router/index.js";
// 数据请求模块
import { getGoodsData } from "../modules/getData.js";
// 视图模块
import listView from "../view/listView.js";
import homeView from "../view/homeView.js";
import cartView from "../view/cartView.js";
import userView from "../view/userView.js";
// 请求公共数据
let data = await getGoodsData();
data = JSON.parse(data);
// 配置路由
// 指定路由地址，和对应的视图模块
router({  
  home: homeView(),
  list: listView(data),
  cart: cartView(data),
  user: userView()
})